package com.gurumades.triggers.client;

import java.util.List;
import java.util.Map;

public interface TriggerRegistry {

	/**
	 * 
	 * @param toTrigger The item to trigger when the condition are met.
	 * @param source The object that should be the source of the event.
	 * 
	 * @param value the value of the source when the event occure.
	 * @param comparator the comparator is used to check if the codition are met
	 */
	public void register(Trigerable toTrigger, Trigger source, Object value,
			TriggerChangeComparator comparator, boolean whatToDo);

	/**
	 * 
	 * @param source The object that is the source of the event.
	 * @param value The current value of the source object
	 * @param comparator The comparator to use for the matching.
	 * @return
	 */
	public Map<Trigerable, Boolean> getMatchings(Object source, Object valuer);

	public void reportEvent(TriggerChangeEvent triggerChange);

	public void reset();
}
